var watch = require('watch')
require('./getFileServer')
// getFileServer()
console.log('server start')
const { env } = require("process")

watch.watchTree(`./build/chrome-mv3-${env.BUILD_FILE_NAME}`, function (f, curr, prev) {
    if (typeof f == "object" && prev === null && curr === null) {
        // console.log("所有文件", f);
    } else if (prev === null) {
        // f is a new file
        console.log('新加入的文件', f)
    } else if (curr.nlink === 0) {
        console.log('删除的文件', f)
        // f was removed
    } else {
        // f was changed
        console.log('更改的文件', f)
    }
})
